package com.iring.domain.common;

import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.Id;
import javax.persistence.Table;
import javax.persistence.Temporal;
import javax.persistence.TemporalType;

import org.hibernate.annotations.Generated;
import org.hibernate.annotations.GenerationTime;

/**
 * 消费明细实体
 *
 * @author wanggan
 */
@Entity
@Table(name = "t_consumption_detail")
public class ConsumptionDetail implements Serializable {

    private static final long serialVersionUID = -8666524952850327814L;
    @Id
    @GeneratedValue
    @Column(name = "id")
    private Integer id;

    @Column(name = "username")
    private String username;

    @Column(name = "operation_type")
    private Integer operationType;

    @Column(name = "operation_time",insertable = false,updatable = false)
    @Temporal(TemporalType.TIMESTAMP)
    @Generated(GenerationTime.INSERT)
    private Date operationTime;

    @Column(name = "operation_amount" ,precision = 10,scale = 2)
    private Double operationAmounts;

    @Column(name = "rest_amount",precision = 10,scale = 2)
    private Double restAmounts;

    @Column(name = "real_charge_amount",precision = 10,scale = 2)
    private Double realCharge = 0.00d;

    @Column(name = "remark")
    private String remark;

    public Integer getId() {
        return id;
    }

    public String getUsername() {
        return username;
    }

    public Integer getOperationType() {
        return operationType;
    }

    public Date getOperationTime() {
        return operationTime;
    }

    public Double getOperationAmounts() {
        return operationAmounts;
    }

    public Double getRestAmounts() {
        return restAmounts;
    }

    public Double getRealCharge() {
        return realCharge;
    }

    public String getRemark() {
        return remark;
    }

    public void setId(Integer id) {
        this.id = id;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public void setOperationType(Integer operationType) {
        this.operationType = operationType;
    }

    public void setOperationTime(Date operationTime) {
        this.operationTime = operationTime;
    }

    public void setOperationAmounts(Double operationAmounts) {
        this.operationAmounts = operationAmounts;
    }

    public void setRestAmounts(Double restAmounts) {
        this.restAmounts = restAmounts;
    }

    public void setRealCharge(Double realCharge) {
        this.realCharge = realCharge;
    }

    public void setRemark(String remark) {
        this.remark = remark;
    }
}
